﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace Deployment.Data.UI.Dialogs
{
    public abstract class AbstractDialogContentControl : UserControl
    {
        public static readonly DependencyProperty ContentOkProperty =
            DependencyProperty.Register("ContentOk",
                typeof(bool),
                typeof(AbstractDialogContentControl));

        public event DependencyPropertyChangedEventHandler PropertyChanged;
        private void SetValueDp(DependencyProperty property, object value)
        {
            SetValue(property, value);
            if (PropertyChanged != null)
                PropertyChanged(this, new DependencyPropertyChangedEventArgs());
        }


        public bool ContentOk
        {
            get { return (bool)GetValue(ContentOkProperty); }
            set { SetValueDp(ContentOkProperty, value); }
        }

        protected internal abstract bool isContentOk();
    }
}
